package com.wthink.card.models;

public class GMBInfoBundle {
	//gps info
	public static final int GPS_NET_STATE_NO = 0;
	public static final int GPS_NET_STATE_GPRS = 2;
	public static final int GPS_NET_STATE_WORK = 3;
	private static int mGpsNetState = GPS_NET_STATE_NO;

	public static final int GPS_GPS_STATE_V = 0;
	public static final int GPS_GPS_STATE_A = 1;
	public static final int GPS_GPS_STATE_N = 2;
	public static final int GPS_GPS_STATE_S = 3;
	private static int mGpsGpsState = GPS_GPS_STATE_V;

	public static final int GPS_DIR_UP = 0;
	public static final int GPS_DIR_DOWN = 1;
	private static int mGpsDirState = GPS_DIR_UP;

	public static final int GPS_LINE_FLAG_ON = 1;
	public static final int GPS_LINE_FLAG_NO = 0;
	private static int mGpsLineFlag = GPS_LINE_FLAG_NO;

	private static int mGpsCurrSpeed = 0;
	private static int mGpsLimitSpeed = 0;
	private static int mGpsDateYear = 2016;
	private static int mGpsDateMonth = 1;
	private static int mGpsDateDay = 1;
	private static int mGpsTimeHour = 0;
	private static int mGpsTimeMin = 0;
	private static int mGpsTimeSecond = 0;

	private static int[] mGpsLong;
	private static int[] mGpsLat;
	private static StringBuilder mGpsToastCue = new StringBuilder();
	private static int mUpdateFileSucc = -1;
	private static int mGpsMsgAlwaysFlag = 0;
	private static StringBuilder mGpsDrvIDCardMsg = new StringBuilder();
	private static  int mGpsSetCutAudio ;
	//socket 返回结果
	private static int mSocketResult = 0;
	private static StringBuilder mSocketAppBoot = new StringBuilder();	//内核boot
	private static StringBuilder mSocketAppKernel = new StringBuilder();	//内核kernel
	private static StringBuilder mSocketAppLk = new StringBuilder();	//内核lk
	private static int mSocketTouchVer = -1;	//触摸版本号
	private static int mSocketTouchCalibration = -1;	//触摸补丁结果返回


	public static synchronized int SetGpsNetState(int val){
		if(val != mGpsNetState){
			mGpsNetState = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsNetState(){
		return mGpsNetState;
	}

	public static synchronized int SetGpsGpsState(int val){
		if(val != mGpsGpsState)
		{
			mGpsGpsState = val;
			return 0;
		}
		return 1;
	}

	public static synchronized int GetGpsGpsState(){
		return mGpsGpsState;
	}

	public static synchronized  int SetGpsCurrSpeed(int val){
		if(val != mGpsCurrSpeed){
			mGpsCurrSpeed = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsCurrSpeed(){
		return mGpsCurrSpeed;
	}

	public static synchronized int SetGpsLimitSpeed(int val){
		if(val != mGpsLimitSpeed){
			mGpsLimitSpeed = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsLimitSpeed(){
		return mGpsLimitSpeed;
	}

	public static synchronized int SetGpsDateYear(int val){
		if(val != mGpsDateYear){
			mGpsDateYear = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsDateYear(){
		return mGpsDateYear;
	}

	public static synchronized int SetGpsDateMonth(int val){
		if(val != mGpsDateMonth){
			mGpsDateMonth = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsDateMonth(){
		return mGpsDateMonth;
	}

	public static synchronized int SetGpsDateDay(int val){
		if(val != mGpsDateDay){
			mGpsDateDay = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsDateDay(){
		return mGpsDateDay;
	}

	public static synchronized int SetGpsTimeHour(int val){
		if(val != mGpsTimeHour){
			mGpsTimeHour = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsTimeHour(){
		return mGpsTimeHour;
	}

	public static synchronized int SetGpsTimeMin(int val){
		if(val != mGpsTimeMin){
			mGpsTimeMin = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsTimeMin(){
		return mGpsTimeMin;
	}

	public static synchronized int SetGpsTimeSecond(int val){
		if(val != mGpsTimeSecond){
			mGpsTimeSecond = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsTimeSecond(){
		return mGpsTimeSecond;
	}

	public static synchronized void SetGpsLong(int[] val){
		mGpsLong = val;
	}
	public static synchronized int[] GetGpsLong(){
		return mGpsLong;
	}

	public static synchronized void SetGpsLat(int[] val){
		mGpsLat = val;
	}
	public static synchronized int[] GetGpsLat(){
		return mGpsLat;
	}

	public static synchronized int SetGpsLineFlag(int val){
		if(val != mGpsLineFlag){
			mGpsLineFlag = val;
			return 0;
		}
		return 1;
	}
	public static synchronized int GetGpsLineFlag(){
		return mGpsLineFlag;
	}



	public static synchronized void SetGpsToastCue(String val)
	{
		mGpsToastCue.delete(0, mGpsToastCue.length());
		mGpsToastCue.append(val);
	}
	public static synchronized StringBuilder GetGpsToastCue(){
		return mGpsToastCue;
	}


	//////////////////
	public static synchronized void SetGpsUpdateSucc(int val)
	{
		mUpdateFileSucc = val;
	}
	public static synchronized int GetGpsUpdateSucc()
	{
		return mUpdateFileSucc;
	}
	public static synchronized void SetGpsMsgAlwaysFlag(int val)
	{
		mGpsMsgAlwaysFlag = val;
	}
	public static synchronized int GetGpsMsgAlwaysFlag()
	{
		return mGpsMsgAlwaysFlag;
	}


	public static synchronized StringBuilder GetGpsDrvIDCardMsg(){
		return mGpsDrvIDCardMsg;
	}

	public static synchronized void SetGpsSetCutAudio(int val){
		mGpsSetCutAudio = val;
	}
	public static synchronized int GetGpsSetCutAudio(){
		return mGpsSetCutAudio;
	}

	//socket
	/**设置socket返回结果**/
	public static synchronized void SetSocketResult(int val){
		mSocketResult = val;
	}
	/**获取socket返回结果**/
	public static synchronized int GetSocketResult(){
		return mSocketResult;
	}
	/**设置内核Boot返回结果**/
	public static synchronized void SetSocketAppBoot(String val){
		mSocketAppBoot.delete(0, mSocketAppBoot.length());
		mSocketAppBoot.append(val);
	}
	/**获取内核Boot返回结果**/
	public static synchronized StringBuilder GetSocketAppBoot(){
		return mSocketAppBoot;
	}
	/**设置内核Kernel返回结果**/
	public static synchronized void SetSocketAppKernel(String val){
		mSocketAppKernel.delete(0, mSocketAppKernel.length());
		mSocketAppKernel.append(val);
	}
	/**获取内核Kernel返回结果**/
	public static synchronized StringBuilder GetSocketAppKernel(){
		return mSocketAppKernel;
	}
	/**设置内核Lk返回结果**/
	public static synchronized void SetSocketAppLk(String val){
		mSocketAppLk.delete(0, mSocketAppLk.length());
		mSocketAppLk.append(val);
	}
	/**获取内核Lk返回结果**/
	public static synchronized StringBuilder GetSocketAppLk(){
		return mSocketAppLk;
	}
	/**设置触摸屏版本号返回结果**/
	public static synchronized void SetSocketTouchVer(int val){
		mSocketTouchVer = val;
	}
	/**获取触摸屏版本号返回结果**/
	public static synchronized int GetSocketTouchVer(){
		return mSocketTouchVer;
	}
	/**设置触摸屏补丁返回结果**/
	public static synchronized void SetSocketTouchCalibration(int val){
		mSocketTouchCalibration = val;
	}
	/**获取触摸屏补丁返回结果**/
	public static synchronized int GetSocketTouchCalibration(){
		return mSocketTouchCalibration;
	}

	public static synchronized void SetGpsScreenOperLog(String val){
		mGpsScreenOperLog.append(val);
	}

	public static synchronized StringBuilder GetGpsScreenOperLog(){
		return mGpsScreenOperLog;
	}
	private static StringBuilder mGpsScreenOperLog = new StringBuilder();		//操作屏日志
	public static synchronized void DeleteGpsScreenOperLog(){
		mGpsScreenOperLog.delete(0, mGpsScreenOperLog.length());
	}

	private static int msgInfoIndex = 0;

	public static synchronized void setMsgInfoIndex(int val)
	{
		msgInfoIndex = val;
	}
	public static synchronized int getMsgInfoIndex()
	{
		return msgInfoIndex;
	}


	private static int lastPosition = 0;

	public static synchronized void setLastPosition(int val)
	{
		lastPosition = val;
	}
	public static synchronized int getLastPosition()
	{
		return lastPosition;
	}

}


